Optimal. Leaf size=157 \[ -\frac {b^3 (8 a+7 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{2 a^{9/2} (a+b)^{3/2} f}+\frac {\left (a^2-2 a b+3 b^2\right ) \sin (e+f x)}{a^4 f}-\frac {2 (a-b) \sin ^3(e+f x)}{3 a^3 f}+\frac {\sin ^5(e+f x)}{5 a^2 f}+\frac {b^4 \sin (e+f x)}{2 a^4 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {4232, 398, 393,
214} \begin {gather*} -\frac {b^3 (8 a+7 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{2 a^{9/2} f (a+b)^{3/2}}+\frac {b^4 \sin (e+f x)}{2 a^4 f (a+b) \left (-a \sin ^2(e+f x)+a+b\right )}-\frac {2 (a-b) \sin ^3(e+f x)}{3 a^3 f}+\frac {\sin ^5(e+f x)}{5 a^2 f}+\frac {\left (a^2-2 a b+3 b^2\right ) \sin (e+f x)}{a^4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 393
Rule 398
Rule 4232
Rubi steps
\begin {align*} \int \frac {\cos ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^4}{\left (a+b-a x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a^2-2 a b+3 b^2}{a^4}-\frac {2 (a-b) x^2}{a^3}+\frac {x^4}{a^2}-\frac {b^3 (4 a+3 b)-4 a b^3 x^2}{a^4 \left (a+b-a x^2\right )^2}\right ) \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (a^2-2 a b+3 b^2\right ) \sin (e+f x)}{a^4 f}-\frac {2 (a-b) \sin ^3(e+f x)}{3 a^3 f}+\frac {\sin ^5(e+f x)}{5 a^2 f}-\frac {\text {Subst}\left (\int \frac {b^3 (4 a+3 b)-4 a b^3 x^2}{\left (a+b-a x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{a^4 f}\\ &=\frac {\left (a^2-2 a b+3 b^2\right ) \sin (e+f x)}{a^4 f}-\frac {2 (a-b) \sin ^3(e+f x)}{3 a^3 f}+\frac {\sin ^5(e+f x)}{5 a^2 f}+\frac {b^4 \sin (e+f x)}{2 a^4 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )}-\frac {\left (b^3 (8 a+7 b)\right ) \text {Subst}\left (\int \frac {1}{a+b-a x^2} \, dx,x,\sin (e+f x)\right )}{2 a^4 (a+b) f}\\ &=-\frac {b^3 (8 a+7 b) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (e+f x)}{\sqrt {a+b}}\right )}{2 a^{9/2} (a+b)^{3/2} f}+\frac {\left (a^2-2 a b+3 b^2\right ) \sin (e+f x)}{a^4 f}-\frac {2 (a-b) \sin ^3(e+f x)}{3 a^3 f}+\frac {\sin ^5(e+f x)}{5 a^2 f}+\frac {b^4 \sin (e+f x)}{2 a^4 (a+b) f \left (a+b-a \sin ^2(e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.29, size = 171, normalized size = 1.09 \begin {gather*} \frac {\frac {60 b^3 (8 a+7 b) \left (\log \left (\sqrt {a+b}-\sqrt {a} \sin (e+f x)\right )-\log \left (\sqrt {a+b}+\sqrt {a} \sin (e+f x)\right )\right )}{(a+b)^{3/2}}+30 \sqrt {a} \left (5 a^2-12 a b+8 b^2 \left (3+\frac {b^2}{(a+b) (a+2 b+a \cos (2 (e+f x)))}\right )\right ) \sin (e+f x)+5 a^{3/2} (5 a-8 b) \sin (3 (e+f x))+3 a^{5/2} \sin (5 (e+f x))}{240 a^{9/2} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.35, size = 158, normalized size = 1.01
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (\sin ^{5}\left (f x +e \right )\right ) a^{2}}{5}-\frac {2 a^{2} \left (\sin ^{3}\left (f x +e \right )\right )}{3}+\frac {2 a b \left (\sin ^{3}\left (f x +e \right )\right )}{3}+a^{2} \sin \left (f x +e \right )-2 a b \sin \left (f x +e \right )+3 b^{2} \sin \left (f x +e \right )}{a^{4}}+\frac {b^{3} \left (-\frac {b \sin \left (f x +e \right )}{2 \left (a +b \right ) \left (-a -b +a \left (\sin ^{2}\left (f x +e \right )\right )\right )}-\frac {\left (8 a +7 b \right ) \arctanh \left (\frac {a \sin \left (f x +e \right )}{\sqrt {\left (a +b \right ) a}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) a}}\right )}{a^{4}}}{f}\) | \(158\) |
default | \(\frac {\frac {\frac {\left (\sin ^{5}\left (f x +e \right )\right ) a^{2}}{5}-\frac {2 a^{2} \left (\sin ^{3}\left (f x +e \right )\right )}{3}+\frac {2 a b \left (\sin ^{3}\left (f x +e \right )\right )}{3}+a^{2} \sin \left (f x +e \right )-2 a b \sin \left (f x +e \right )+3 b^{2} \sin \left (f x +e \right )}{a^{4}}+\frac {b^{3} \left (-\frac {b \sin \left (f x +e \right )}{2 \left (a +b \right ) \left (-a -b +a \left (\sin ^{2}\left (f x +e \right )\right )\right )}-\frac {\left (8 a +7 b \right ) \arctanh \left (\frac {a \sin \left (f x +e \right )}{\sqrt {\left (a +b \right ) a}}\right )}{2 \left (a +b \right ) \sqrt {\left (a +b \right ) a}}\right )}{a^{4}}}{f}\) | \(158\) |
risch | \(-\frac {5 i {\mathrm e}^{i \left (f x +e \right )}}{16 f \,a^{2}}-\frac {3 i {\mathrm e}^{i \left (f x +e \right )} b^{2}}{2 a^{4} f}+\frac {5 i {\mathrm e}^{-3 i \left (f x +e \right )}}{96 f \,a^{2}}+\frac {3 i {\mathrm e}^{i \left (f x +e \right )} b}{4 a^{3} f}+\frac {i {\mathrm e}^{3 i \left (f x +e \right )} b}{12 a^{3} f}-\frac {i {\mathrm e}^{-3 i \left (f x +e \right )} b}{12 a^{3} f}+\frac {5 i {\mathrm e}^{-i \left (f x +e \right )}}{16 f \,a^{2}}-\frac {3 i {\mathrm e}^{-i \left (f x +e \right )} b}{4 a^{3} f}-\frac {5 i {\mathrm e}^{3 i \left (f x +e \right )}}{96 f \,a^{2}}-\frac {i b^{4} \left ({\mathrm e}^{3 i \left (f x +e \right )}-{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{4} \left (a +b \right ) f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )}+\frac {3 i {\mathrm e}^{-i \left (f x +e \right )} b^{2}}{2 a^{4} f}+\frac {2 b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{\sqrt {a^{2}+a b}\, \left (a +b \right ) f \,a^{3}}+\frac {7 b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{4 \sqrt {a^{2}+a b}\, \left (a +b \right ) f \,a^{4}}-\frac {2 b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{\sqrt {a^{2}+a b}\, \left (a +b \right ) f \,a^{3}}-\frac {7 b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (f x +e \right )}}{\sqrt {a^{2}+a b}}-1\right )}{4 \sqrt {a^{2}+a b}\, \left (a +b \right ) f \,a^{4}}+\frac {\sin \left (5 f x +5 e \right )}{80 f \,a^{2}}\) | \(530\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 190, normalized size = 1.21 \begin {gather*} \frac {\frac {30 \, b^{4} \sin \left (f x + e\right )}{a^{6} + 2 \, a^{5} b + a^{4} b^{2} - {\left (a^{6} + a^{5} b\right )} \sin \left (f x + e\right )^{2}} + \frac {15 \, {\left (8 \, a b^{3} + 7 \, b^{4}\right )} \log \left (\frac {a \sin \left (f x + e\right ) - \sqrt {{\left (a + b\right )} a}}{a \sin \left (f x + e\right ) + \sqrt {{\left (a + b\right )} a}}\right )}{{\left (a^{5} + a^{4} b\right )} \sqrt {{\left (a + b\right )} a}} + \frac {4 \, {\left (3 \, a^{2} \sin \left (f x + e\right )^{5} - 10 \, {\left (a^{2} - a b\right )} \sin \left (f x + e\right )^{3} + 15 \, {\left (a^{2} - 2 \, a b + 3 \, b^{2}\right )} \sin \left (f x + e\right )\right )}}{a^{4}}}{60 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.91, size = 599, normalized size = 3.82 \begin {gather*} \left [\frac {15 \, {\left (8 \, a b^{4} + 7 \, b^{5} + {\left (8 \, a^{2} b^{3} + 7 \, a b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {a^{2} + a b} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {a^{2} + a b} \sin \left (f x + e\right ) - 2 \, a - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + 2 \, {\left (6 \, {\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \cos \left (f x + e\right )^{6} + 16 \, a^{5} b - 8 \, a^{4} b^{2} + 26 \, a^{3} b^{3} + 155 \, a^{2} b^{4} + 105 \, a b^{5} + 2 \, {\left (4 \, a^{6} + a^{5} b - 10 \, a^{4} b^{2} - 7 \, a^{3} b^{3}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (8 \, a^{6} + 11 \, a^{4} b^{2} + 54 \, a^{3} b^{3} + 35 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{60 \, {\left ({\left (a^{8} + 2 \, a^{7} b + a^{6} b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{7} b + 2 \, a^{6} b^{2} + a^{5} b^{3}\right )} f\right )}}, \frac {15 \, {\left (8 \, a b^{4} + 7 \, b^{5} + {\left (8 \, a^{2} b^{3} + 7 \, a b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {-a^{2} - a b} \arctan \left (\frac {\sqrt {-a^{2} - a b} \sin \left (f x + e\right )}{a + b}\right ) + {\left (6 \, {\left (a^{6} + 2 \, a^{5} b + a^{4} b^{2}\right )} \cos \left (f x + e\right )^{6} + 16 \, a^{5} b - 8 \, a^{4} b^{2} + 26 \, a^{3} b^{3} + 155 \, a^{2} b^{4} + 105 \, a b^{5} + 2 \, {\left (4 \, a^{6} + a^{5} b - 10 \, a^{4} b^{2} - 7 \, a^{3} b^{3}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (8 \, a^{6} + 11 \, a^{4} b^{2} + 54 \, a^{3} b^{3} + 35 \, a^{2} b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \sin \left (f x + e\right )}{30 \, {\left ({\left (a^{8} + 2 \, a^{7} b + a^{6} b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{7} b + 2 \, a^{6} b^{2} + a^{5} b^{3}\right )} f\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 188, normalized size = 1.20 \begin {gather*} -\frac {\frac {15 \, b^{4} \sin \left (f x + e\right )}{{\left (a^{5} + a^{4} b\right )} {\left (a \sin \left (f x + e\right )^{2} - a - b\right )}} - \frac {15 \, {\left (8 \, a b^{3} + 7 \, b^{4}\right )} \arctan \left (\frac {a \sin \left (f x + e\right )}{\sqrt {-a^{2} - a b}}\right )}{{\left (a^{5} + a^{4} b\right )} \sqrt {-a^{2} - a b}} - \frac {2 \, {\left (3 \, a^{8} \sin \left (f x + e\right )^{5} - 10 \, a^{8} \sin \left (f x + e\right )^{3} + 10 \, a^{7} b \sin \left (f x + e\right )^{3} + 15 \, a^{8} \sin \left (f x + e\right ) - 30 \, a^{7} b \sin \left (f x + e\right ) + 45 \, a^{6} b^{2} \sin \left (f x + e\right )\right )}}{a^{10}}}{30 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.18, size = 173, normalized size = 1.10 \begin {gather*} \frac {{\sin \left (e+f\,x\right )}^5}{5\,a^2\,f}+\frac {{\sin \left (e+f\,x\right )}^3\,\left (\frac {2\,\left (a+b\right )}{3\,a^3}-\frac {4}{3\,a^2}\right )}{f}+\frac {\sin \left (e+f\,x\right )\,\left (\frac {6}{a^2}-\frac {{\left (a+b\right )}^2}{a^4}+\frac {2\,\left (a+b\right )\,\left (\frac {2\,\left (a+b\right )}{a^3}-\frac {4}{a^2}\right )}{a}\right )}{f}+\frac {b^4\,\sin \left (e+f\,x\right )}{2\,f\,\left (a+b\right )\,\left (-a^5\,{\sin \left (e+f\,x\right )}^2+a^5+b\,a^4\right )}-\frac {b^3\,\mathrm {atanh}\left (\frac {\sqrt {a}\,\sin \left (e+f\,x\right )}{\sqrt {a+b}}\right )\,\left (8\,a+7\,b\right )}{2\,a^{9/2}\,f\,{\left (a+b\right )}^{3/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________